System for accessing a POS terminal, method for downloading and updating applications and method for performing electronic operation using such a system

ABSTRACT

The present invention refers to system for accessing POS terminals ( 10 ), with or without pin pad, using a client system ( 15 ) to connect such POS terminal ( 10 ) to a network comprised by at least one server ( 30 ), the system enabling any POS terminal ( 10 ) to execute applications ( 25 ) located in such servers, through a plurality of specific protocols ( 20 ) in a process similar to the Internet, as well to download and update applications from application servers ( 30 ) and to perform electronic operations in transaction serves ( 35 ).

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of priority from and is a nationalphase entry of PCT/BR2005/000094, filed May 25, 2005, entitled “SystemFor Accessing A POS Terminal, Method For Downloading And UpdatingApplications And Method For Performing Electronic Operation Using Such ASystem”, which claims the benefit of priority from U.S. Ser. No.60/574,134, filed May 25, 2004, entitled “System And Method ForDeveloping And Deploying Applications In Countertop And PortableTransaction Devices Using Markup Languages”, all of which areincorporated herein by reference in their entirety.

FIELD OF THE INVENTION

The present invention relates to a system for accessing POS and pin paddevices using a client system connected by a network to at least oneserver as well as to a method for updating and downloading applicationand performing a plurality of operations using said system.

DESCRIPTION OF THE PRIOR ART

Many companies in the industry of electronic operations (healthcareinsurance, loyalty, pre paid reload, gift card, etc.) are constantlyseeking for solutions to improve their services and offer new ones,becoming more competitive.

Prior to the advent of the present invention, the users, also known asacquirers, had been provided with technologically limited terminals.

Regarding portability, each Point-of-Sale terminal, herein called POSterminal, comprised only their proprietary hardware and operatingsystem. Accordingly, applications needed to be rewritten and adapted foreach terminal model, in a laborious and expensive process. Applicationsharing was also insufficient since POS terminals used in the networkwere able only to send and receive transaction data, without takingadvantage of other network facilities such as application servers. Also,since applications were hard-coded into the POS terminals (fat client),it was extremely difficult, may be impossible, to use differentapplications on the same machine due to memory and developmentrestrictions.

In this way, each POS terminal used to be independently updated in anon-automated process. Lately, heterogeneous environments and remoteupgrading systems provided by manufacturers of POS terminals used to beapplied in upgrading processes. However, such terminals and theirrespective upgrading systems were not compatible with each other,requiring specific knowledge and maintenance staff for each system andeach vendor, thus replicating efforts and costs.

Another problem existing in the prior art was the necessity of havingadvanced programming skills as well as a deep knowledge of theproprietary operating environment of each terminal manufacturer on themarket, regarding its specificity. It resulted in a huge amount of costsin training staffs, application development and maintenance, andconsequently, it limited the scope of available POS services andapplications.

OBJECTIVE OF THE INVENTION

In view of the drawback above indicated, the invention provides a systemfor accessing POS devices transforming POS networks into servicenetworks and reducing costs in implementing and managing such POSnetworks.

Another objective of the present invention is to provide a system whichfeatures more portability to applications in different models of POSterminals as well as allows sharing of multiple applications in the samePOS device.

A further objective of the present invention is to provide a system foraccessing devices that enable users to execute an application in POSterminal made by different vendors with no need for customization.

An important aspect of the invention is that the system is engineered tocomplement the use of standard POS terminals, not to compete with themsince many companies, as VeriFone, Ingenico, Lipman, Sagem, Axalto andIntellect among others, have already developed such POS terminal a longtime ago.

SUMMARY OF THE INVENTION

The invention refers to a client system for accessing POS and pin paddevices, connecting such POS terminal to a network comprised by at leastone server. The system enables any POS terminal to execute applicationslocated in application servers connected to the POS network using TCP/IP(Internet, Intranets, VPNs, etc.) and, WML (Wireless Markup Language)pages and scripts, in a process similar to the Internet.

The client system technology implements a thin-client model for theclient/server architecture. It assumes that the client has direct accessto the server, where all business logic remains. This assumptionintrinsically offers two major advantages to software development andmaintenance. Application development occurs entirely at the server sidewhere many high productivity tools are available and client sideapplication can be automatically upgraded immediately after a serverside update.

WAP standard, aiming at first generation cell phones, is concerned withcommunication penalties between the client and the server. Therefore,WAP forum has specified some information persistence and data validationmechanisms that dramatically reduce the amount of information exchangedthrough the network during successive WML (Wireless Markup Language)pages transition. Unchanged screen page requests may also be avoidedwith HTTP or WSP Web protocols cache mechanisms, although still relyingon a client-driven updating process. Hence, together with WMLScript datavalidation routines, WML browsing almost resembles a POS applicationflow of screens.

WML is a declarative markup language targeted to create data entryscreens. It offers basic input typing facilities and basic choiceselection. It has a volatile variable environment meant to storeinformation among screens of the same transaction flow. WMLScript is atiny scripting language designed to simple data validation scriptwriting. Neither WML nor WMLScript provide any persistent data storageneither assumes the presence of any particular peripheral device.

By analogy, the client system concept was brought to POS terminals.Particularly, WML browsers have shown to be the closest standard thatwould offer to a POS terminal the web and browsing benefits even stilllacking some key features required by electronic operations, such asreceipt printing and transaction history storage, among others.

POS terminals used to have peripherals, like magnetic card reader,thermal printer, pin pad entry device, smart card readers and otherserial devices that are commonly integrated through a standard RS-232interface such as a bar code reader, a Mifare contact-less card readerand/or a check reader. Besides peripheral device access, POSapplications demand some features not available on standard WML andWMLScript definitions such as persistent data record store, ISO8583message formatting, classified information cryptography, and enhanceddata entry support, EMV transaction authorization and, for dial upterminals, SDLC and X.28 legacy network support. Moreover, a serverdriven cache update policy was required in order to fit currenttransaction servers upgrading mechanisms.

As it will be described in the present invention, the client systemtechnology allows the use of the POS terminal as a “low cost” platformfor multiple applications sharing and value added services, turning aPOS network into a “de facto” service network.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 depicts a POS terminal connected to multiple networks viadifferent communication protocols.

FIG. 2 depicts the individual customization of each POS terminal taughtby the state of the art.

FIG. 3 depicts how the invention makes capable the communication of anycustomized POS terminal with an application server.

FIG. 4 depicts an uploading-downloading diagram and an electronicoperation diagram being executed by the present invention.

FIG. 5 depicts a diagram with POS client system applicationupload-download sequence.

FIG. 6 depicts a diagram with POS client system Electronic operationssequence.

FIG. 7 depicts the POS client system architecture and protocol layers.

DETAILED DESCRIPTION OF THE INVENTION

The present invention consists of a system for accessing and connectingcustomized POS terminals 10 to any network, using a specific clientsystem 15. When in operation, the client system 15 assumes the controlof all resources of the POS terminals 10 acting as an operationalsystem. It enables any POS terminal 10 to execute applications 25located in application servers 30 connected to the POS network usingTCP/IP (Internet, Intranets, VPNs, etc.) and WML (Wireless MarkupLanguage) pages and scripts in a process similar to the Internet. Theclient system 15 also enable the same application 25 to use multiplecommunication protocols 20 when connected to distinct access networks,thus making it possible the use of TCP/IP, legacy networks (SDLC andX.28, for example) and others (GSM, GPRS, CDMA, Ethernet, Wi-Fi,Bluetooth, IR, etc) as shown in FIG. 1. Further, the client system 15also has an advanced caching feature with the purpose of increasingdata-exchange speed, allowing even true offline operations. The clientsystem 15 still recognizes and controls all of the input and outputdevices connected to the POS, such as magnetic card readers, smart cardreaders, printers, pin pads, bar code readers, check readers, keyboards,Mifare contact-less card reader and so forth.

The access to application servers 30 provided by the present inventionmakes it possible to bring to the POS network all of the flexibility andfunctionalities available on the Internet on what concerns services andapplications. As a result, it reduces the maintenance costs and addsflexibility to the process of applications upgrading. Moreover, becauseof the possibility of using distinct physical networks, the applicationupgrading process does not compromise the average data exchange time,which use legacy networks based on SDLC or other asynchronous protocols.

FIG. 2 shows how POS terminals 10 were usually upgraded. Prior to thepresent invention, the application needed to be customized, so as eachporting has to be carried out for each POS terminal model. Suchoperation used to be executed individually, requiring specific knowledgeand maintenance staff for each POS terminal system.

As it can be seen from FIG. 3, the client system operational environmentallows sharing of an arbitrary amount of applications 25 in only one POSterminal 10, using application servers 30 connected through the network,also enabling to upgrade such applications remote and automatically andin real time.

PREFERRED EMBODIMENT OF THE INVENTION

In order to solve the problems described above, the present inventiondefines web client system extensions that adapt a standard WAP browserto use the POS peripherals and extend it to perform electronicoperations.

The solution solves an existing problem with a new technology, joiningthe reliability and execution speed of ISO 8583 operations over legacyprotocols, such as SDLC and X.28, with the maintainability anddevelopment speed of web applications.

When in operation, this client system 15 assumes the control of all ofthe POS terminal resources acting as the operational system itself. Itenables any POS terminal 10 to run web applications 25 downloaded fromapplication servers 30 connected to the POS network using HTTP on top ofTCP/IP, optionally secured by SSL protocol, in a process similar to theInternet. TCP/IP access to the application server 30 can be done using asimple dial up connection, or a broadband network like, GPRS, CDMA 1x,Ethernet II and WiFi (IEEE 802.11).

POS web applications, consisting of WML pages, scripts and other files,perform ISO8583 electronic operations with the transaction server 35,pretending to be a conventional C application. Such operations flow bothover SDLC/X.28 dial up connections or over TCP/IP broad band networks.

This scheme is shown on FIG. 4. By observing such figure, it is possibleto detect the two distinct situations on the POS client system 15 lifecycle. The first one is when it connects to the application server 30 todownload or update the web application and the second when thisapplication 25 connects to the transaction server 35 to perform anelectronic transaction.

Application download can be detailed within the following steps,according to FIG. 5:

1. Technician types the application server connection settings

2. POS client system 15 connects to a Remote Access Server (RAS) 45 orattaches to a broadband network.

3. POS client system 15 receives an Internet Protocol (IP) address.

4. POS client system 15 establishes a Transfer Control Protocol (TCP)session with the application server 30 and sends an applicationdownload/update request, usually with a HTTP (or HTTPs) POST command.

5. Application server 30 processes the request.

6. Application server 30 contacts the transaction server 35, pretendingto be the POS Terminal 10, with an ISO8583 message on a TCP/IPconnection.

7. Transaction server 35 responds to the application server 30 with thePOS client system configuration settings.

8. Application server 30 processes the application settings and builds acustomized version of the Web Application.

9. Application server 30 sends to the POS client system 15 the webapplication pages, scripts and data files.

10. POS client system 15 process the files received.

11. POS client system 15 emits a receipt of applicationdownload/updating completion to the technician

12. POS client system 15 automatically starts the Web Application.

The steps 6 and 7 above are optional in the solution. In another usecase, the application server can simply download the whole applicationwithout the need of the application customization process or access tothe transaction server.

Further, electronic operations perform a simpler process that can bedetailed with the following steps, as shown in FIG. 6:

1. POS user types the transaction data;

2. POS client system 15 connects to a Remote Access Server (RAS) 45 orattaches to a broadband network.

3. POS client system 15 receives network access.

4. POS client system builds an ISO8583 message.

5. POS client system sends the ISO8583 message to the transaction server35.

6. Transaction server 35 responds to the POS client system with anISO8583 message.

7. POS client system 15 process the received message.

8. POS client system 15 emits a transaction receipt.

1. Architecture and Protocol Layers

In order to better define the invention the architecture of clientsystem is detailed below and divided in specific layers as illustratedin FIG. 7.

1.1—Communication Protocol

Regarding communication protocols, the client system is able to runoperations through one of the following protocols: TCP/IP/PPP, SDLC,X.28, GSM, GPRS, CDMA, Ethernet, Wi-Fi, Bluetooth, IR, etc. Theapplication is in charge of selecting which protocol shall be usedduring a operation.

1.2—Security Protocol

The thin-client application exchanges data with the web server throughthe HTTPS protocol, which is based on the SSL 3.0 standard. The SSLlayer runs on top of the TCP protocol and provides support for an HTTPclient to establish secure connection with any compliant server.

The client system supports the following cipher suites: RSA+RC4+MD5 andRSA+3DES+MD5. Both of them support server certificate authentication andclient certificate authentication in the PEM format. The cipher suitewith 3DES also supports client certificate authentication in the PKCS12format.

1.3—Transaction Protocols

The client system supports HTTP, ISO8583 and XML operations. HTTPoperations are available through WML tag <go> and both GET and POSTcommands are supported. ISO8583 and XML operations are offered byWMLScript extensions. All protocols may coexist at the same applicationand may connect to distinct servers according to the applicationsettings.

1.4—Run Time Engine

After prompting the user interface, the client system keeps waiting forthe user interaction to trigger events against the runtime engine. Theseevents are handled according to the current page definitions and maytrigger some local WMLScript processing or invoking another page to beloaded. When a new WML page is loaded, it is parsed by the WMLcustomized XML parser and a DOM syntax tree is generated. The tree isthen traversed and the runtime internal structures are set to respondproperly to the next user generated events. Both pages and scripts maybe found at the cache of the client system or may be requested to anHTTP(S) server.

1.5—Multi-Application Manager (MAM)

The client system Multi-Application Manager allows more than oneapplication resides and to be executed in the same POS. The clientsystem isolates applications from other applications using differentvirtual execution environment. The resources (WMLs, scripts, data filesand variables) can be created, read or updated by the owner applicationonly.

The applications can be configured into the terminal from a PC, using aserial communication, or can be fetched from a server, over TCP/IP. Thebasic configuration is stored in a table of applications (TA) in the POSthat stores information about the current set of applications.

MAM Main Functionalities:

Application Automatic Load. Update or Delete—The master application,which has privileged rights and usually belongs to the POS owner, canrequest a application table update from the sever, in order to add,delete or update applications in that terminal. The same operation canbe done for a technician through the configuration menu. SeeMulti-Application Configuration functionality described below.

Communication Between Applications—the client system permitscommunication between applications. Application A can start applicationB, as well as send parameters from an application to another.

Switching Between Applications—User can switch from an application toanother by pressing a soft key that calls the client system main menu.From it users can select other applications.

Application Table Validation—A Key is used to verify if the currentvalid application table (TA) belongs to the current POS. If the key doesnot match, a new TA is necessary.

Multi-Application Configuration—An interface for the POS operator.Through it is possible to execute basic configuration and operationfunctions, including delete, add or update applications.

1.6—EMV Protocol Standard Library

In order to abstract distinct manufacturer's terminal capabilitiesregarding the EMV protocol, the client system assumes the existence ofan EMV library. This library is, actually, a PINPad interface librarythat encapsulates all the interactions between the client system and thePOS EMV kernel.

The client system offers the EMV Library to the thin-client applicationas a WMLScript extension library, named PINPadLib.

2. Client System Extensions

Both WML and WML Script Languages were originally designed to create WEBSites that can be displayed in WAP browsers, which are usually availablein cell phones. In order to fulfill the requirements of a standard POSapplication, the invention defines some extensions to WML and WML ScriptLanguages.

This set of WML tags, attributes and script functions allow, among othercharacteristics, that POS applications running over the clientsystem: 1) access devices usually available in POS terminals such ascard readers, printer, barcode readers, pin pad, Mifare contact-lesscard readers, check readers, etc. . . . ; 2) use multiple communicationprotocols when connected to distinct access networks (SDLC, X.28,TCP/IP, PPP, GPRS, CDMA, WNB, etc. . . . ); 3) persistent data recordstore; 4) access the EMV kernel presents in the POS operating system; 5)ISO8583 message formatting; 6) classified information cryptography; etc.. . .

The complete list of extensions as well as their detailed functionalityis described below.

2.1—Tag Extensions to the WML Language

This section presents the new tags, and their attributes, provided to aWAP browser in order to turn it into a POS client system.

Tag Description Interpreted Attributes beep Starts beeping in thespecified frequency until frequency times - number of a key is hit.times the beep must go off. sync (true|false) - plays the beep inexhibition time (true) or in runtime (false) when a redirection occursform Allows data entry in pages containing None tags <input>automatically positioning the cursor on the next field when hitting the<enter> key. If the number of lines between the two fields is higherthan the number of lines on screen, the cursor will be positioned on thelast line on screen. Its function is similar to tag's <p>, being definedin the same scope and accepting the same attributes and content. pinpadMakes it possible to use the pinpad name - Name of the variable in WMLpages. that receives the entry. It can be defined in the same scopetitle - Text presented on the as tag's <input>. Just like tag's pinpaddisplay <input>, it cannot have any content. maxlength - maximum lengthThe attributes explanation is on of the entry string screen type(text|hidden|password) - text and password are similar to the tag inputhomonym. Hidden, doesn't repeat the typed; it is used to confirm valuesmasterkey - Encoded Key that goes with the pinpad (Provider)workingkey - Encoded Key provided by the user (Client) account - CardNumber (More frequently used for VISA) pre Works in a similar way asHTML None homonym tag. Shows a text with its contents in the way it waswritten. Has a similar function as tag <p>, being defined in the samescope and accepting the same attributes and contents. report Enablesprinting reports. The tag's footerLFs - Number of line- contents areprinted instead of being feeds characters at the end of displayed on thescreen. Its the report function is similar to tag's <p>, being height(1|2) - font height defined in the same scope and width (1|2) - fontwidth accepting the same attributes and contents Setenv Attributes andbehavior are similar name - Name of the variable to <setvar>. Thedifference is that receiving the value this one sets variables in thebrowsers value - Value to be assigned persistent environment SetfieldAttributes and behavior are similar name - Flexi-record Id of the to<postfield>. The difference is field to be set. that this one sets afield into a Flexi- value - Value to be assigned record structure to besent to type - Type of the field (string| another application through aint|long) “vmac://” scheme href of the tag <go>2.2—Attributes Extensions to the WML Language

This section presents the new attributes, values and standard attributesnew behavior, provided to a WAP browser in order to turn it into a POSclient system.

Tag Attributes Description Card newcontext = (true|false|vars) Newvalue: “vars” value initializes just the variables. autoprint =(true|false) New attribute: Automatically prints the current cardcontents. dialup = (true|false) New attribute: Connects automaticallywhen showing the card. hangup = (true|false) New attribute: Disconnectsautomatically when showing the card. persist = (true|false|last|none)New attribute: Permits a deck to be persisted: true - It will create acopy of the current file using the name “persist.wml”. The olderpersisted file will be rename to “last_persist.wml” false - No actionswill be taken. last - It will rename “last_persist.wml” to“persist.wml”. none - It will erase the file “persist.wml” so that it isnot undesirably used. onrefresh = hRef New attribute: url to go when therefresh intrinsic event is triggered onuserevent = hRef New attribute:url to go when any user event (card switpe, keystroke, barcode reading)is triggered. Usually useful to idle screens. onvalidate = hRef Newattribute: url to go after every input confirmation in the card current.Go Localsrc = hRef New attribute: Path to the local file for the get andput operation. src = hRef New attribute: Path to the remote file for theget and put operation. delimiter New attribute: Delimiter for thepostfields list. user New attribute: User login for servers that requireaccess authorization. password New attribute: User password for serversthat require access authorization. hRef = hRef New behavior: Send OS MAMevents to other applications if set with a URLs like“osmam://LogAppName:EventNo”. Arguments can be passed through TLV recordstructure with <setfield> tag or through HTTP format with “?” get syntaxor with <postfield> tag. Input align = (left|right) New attribute: Textaligns inside the input space. Device = (keypad|keyboard| New attribute:Selected data barcode|magnetic) entry device. Possible values are:magnetic - Magnetic card reader; barcode - Barcode reader; keyboard -External keyboard; keypad - Standard keyboard. type =(text|password|currency) New value: The currency value forces the inputvalue to have cents (e.g. “0.00”) alarm = (true|false) New attribute: Iftrue, sounds a beep when the input size has been reached. filler Newattribute: Character to fill the input area in order to let the useraware of the size of the input. Its presence forces input masks to beshown prior typing and caret is suppressed. fullformat = (true|false)Now attribute: Requires the entire input field to be fulfilled. literals= (true|false) New attribute: If true, suppresses the format charactersform the variable value. One- type = (. . .|onrefresh|onuserevent| Newvalue: New “intrinsic” events vent onvalidate) that are triggered thesame way as their <card> attribute counterparts. Timer abort =(true|false) New attribute: Indicates if the timer can be disabled whena key is hit2.3—WML Script Functions Extensions to the WML Script Standard Libraries

This section presents extensions to the WML Script standard libraries,provided to a WAP browser in order to turn it into a POS client system.The definitions of such extensions Script Functions are explained belowof the table.

WML Script Standard Library WML Script Extended Functions FLOATtoFloat(value) STRING setElementsPos(String, separator, nElements)elementAtPos(elementPos) formatCurrency(currencyString)isNumeric(string) toUpper (string) toLower (string) padRight (string,pad, len) padLeft (string, pad, len) URL loadFile (url, fileName)loadToCache (url) WMLBROWSER setEnv(Name, Value) goExt(url, method,blsBack) beep(Freq, nTimes) hangUp( ) dialup( ) Persist( ) setPostfield(name, value) clearCacheWithTag (tag) getFirstVarName ( ) getNextVarName( ) getPrevVarName ( ) pin2pin( ) dial(StringtoWhere) upLoad( )addEnv(varName, increment) appendVar(varName, value)setEnvFromVars(varName, varList) setVarsFromEnv(varName)getVarFromEnv(envVarName, varName) deleteContext(appName) isConnected( )installApp(appDataFile) setVarFromVars(varName, varList)setVarsFromVar(varName) getVarFromVar(wmlVarName, varName)getVarFromStr(wmlsStringOrVar, varName) DIALOGS show(message,defaultInput) showStatus(message, defaultInput)Specific Functions Created to the POS Client System:toFloat(value)—This function returns the floating-point representationof a given value. This function executes, exactly, the same typeconversions defined for WMLScript language. An invalid value returns thestring “invalid”. Required to force type conversion when typed variablesare used.setElementsPos(String, separator, nElements)—This function storesnElements of String separated by separator. In case it succeeds, itreturns an integer, which contains the position of the last character ofthe last element stored. Usually, it's used before a call toString.elementAtPos(elementPos) shown below.elementAtPos(elementPos)—This function returns the element of a string,which is in the position elementPos. The string must already have beenorganized with the application of the function setElementsPos(String,separator, nElements). If the string is not already organized byfunction setElementsPos, the one that was previously organized will beused. In case of error, it returns invalid.formatCurrency(currencyString)—This function formats a String incurrency notation, separating the cents with a comma or period mark, aswell as the thousands and so on. The function returns the Stringformatted or invalid in case it fails.isNumeric(string)—This function returns true if the argument cansuccessfully be converted to a numeric value, otherwise, it returnsfalse.toUpper (string)—This function returns string argument converted touppercase.toLower (string)—This function returns string argument converted tolowercase.padRight (string, pad, len)—This function returns string argumentright-padded with pad character up to the length len.padLeft (string, pad, len)—This function returns string argumentleft-padded with pad character up to the length len.loadfile (url, fileName)—This function retrieves the content denoted bythe absolute url and save at a file named fileName. It already stripsout HTTP headers and returns the HTTP result code (200 means Ok).loadToCache (url)—This function retrieves the content denoted by theabsolute url and stores it in the client system cache for future usage.It returns the HTTP result code (200 means Ok).setEnv(Name, Value)—This is an extension that receives as parameters thename of the environment variable of POS and the value to be attributedto this variable. Returns true if it succeeds changing the variablevalue or false, if it does not. In case of failure (invalid parameters,for example), it returns invalid.goExt(url, method, blsBack)—This extension of the functionWMLBrowser.go( ) allows the forward or return to a defined URL. Thereturn to a WML page will require the realization of the“onenterbackward” event, in case it is foreseen. It receives asparameters the url, the method (POST or GET), and a logic value bisBack,indicating the return to the URL. Returns the empty string in case itsucceeds, otherwise, it returns invalid.beep(Freq, nTimes)—This function emits a sound in the output device inthe frequency specified by Freq, and the number of times specified bynTimes. Returns the empty string in case it succeeds, otherwise, itreturns invalid.hangUp( )—This function disconnects the POS from the telephone line.Returns the empty string.dialup( )—This function starts the asynchronous connection of POS to thetelephone line. Returns the empty string.Persist( )—This function generates a copy of the current Script with thename “i:persist.wmlsc”. In case this file already exists, it will berenamed to “i:last persist.wmlsc”. Returns the number of bytes recordedin the file “i:persist.wmlsc”. If the current script have already eraseditself by clearing the cache, then the result of calling persist isundefined and may result in runtime error.setPostfield (name, value)—This function sets post fields that aresupposed to be sent with the next call to WMLBrowser.goExt(href,“POST”,true). It returns the empty string if it succeeds, otherwise itreturns invalid.clearCacheWithTag (tag)—This function erases from cache every file thatpresents a “VWTag:” HTTP header beginning with tag.getFirstVarName ( )—This function returns the name of the firstenvironment variable. Together with getNextVarName( ) andgetPrevVarName( ), it offers an iterator to the persistent environment.getNextVarName( )—This function returns the name of the firstenvironment variable. Together with getFirstVarName( ) andgetPrevVarName( ), it offers an iterator to the persistent environment.getPrevVarName ( )—This function returns the name of the firstenvironment variable. Together with getFirstVarName( ) andgetNextVarName( ), it offers an iterator to the persistent environment.pin2pin)—This function starts an Operating System driven “back to back”client system clone.dial(String toWhere)—This function set the dial parameters from aconfiguration in a record store. Returns the connection status.getConStatus( )—This function returns an integer whose value is theconnection status.upLoad( )—This function starts the “back to back” application cloningupload.addEnv(varName, increment)—This function receives as parameters the nameof the environment variable of POS and an integer value to be added tothis variable's current value. If the variable does not exists it iscreated with the value received as parameter. Returns true if itsucceeds changing the variable value or false, if it does not. In caseof failure (invalid parameters, for example), it returns invalid.appendVar(varName, value)—This function receives as parameters the nameof the environment variable of POS and a string value to be appended tothis variable's current value. If the variable does not exists it iscreated with the value received as parameter. Returns true if itsucceeds changing the variable value or false, if it does not. In caseof failure (invalid parameters, for example), it returns invalid.setEnvFromVars(varName, varList)—This function sets the environmentvariable varName with the variables defined in the semi-colon separatedvar name list varList. It returns the len of the string set to varName,which should be saved for future usage with the functionssetVarsFromEnv( ) or getVarFromEnv( ).setVarsFromEnv(varName)—This function sets the WML context with thevariables got from the value of environment variable varname. It returnsthe number of variables set, which should have been saved with functionsetEnvFromVars( ).getVarFromEnv(envVarName, varName)—This function returns the value ofthe variable named varName from the value of environment variableenvVarName. If the variable is not defined by the value it returns theempty string.deleteContext(appName)—This Function completely deletes the files ofapplication named appName. It can only be called by the POS MasterApplication.isConnected( )—This function replaces getConStatus( ) returns a Booleanindicating whether the connection is on.installApp(appDataFile)—This function installs an application from adatafile named appDataFile and returns a integer indicating the errorcode. If this function runs well, terminal will be restarted and returncode will not be tested.setVarFromVars(varName, varList)—This function sets WML variable varNamewith the variables defined in the semi-colon separated var name listvarlist. It returns the len of the string set to varname, which shouldbe saved for future usage with the functions setVarsFromVar( ) orgetVarFromVar( ).setVarsFromVar(varName)—This function sets the WML context with thevariables got from the value of the WML variable varName. It returns thenumber of variables set, which should have been saved with functionsetVarFromVars( ).getVarFromVar(wmlVarName, varname)—This function returns the value ofthe variable named varname from the value of WML variable wmlVarName. Ifthe variable is not defined by the value it returns the empty string.getVarFromStr(wmlsStringOrVar, varName)—This function returns the valueof the variable named varName from the value of a WMLScript variable orstring wmIsStringOrVar. If the variable is not defined by the value itreturns the empty string.show(message, defaultInput)—This function shows a message on the POSscreen and continue the execution regardless the user's request. In caseit succeeds, it returns the empty string, otherwise, it returns invalid.showStatus(message, defaultInput)—This function shows a message in theStatus line on the POS screen. In case it succeeds, it returns the emptystring, otherwise, it returns invalid.2.4—WML Script Libraries and Functions—Extensions to the WML ScriptStandard Libraries

This section presents the WML Script extension libraries provided to aWAP browser in order to turn it into a POS client system.

Extended Library Extended Functions RECORDSTORE openStore (Name,CreateIfNecessary) CloseStore(StoreId) deleteStore (Name)getNumRecords(StoreId) getSize(StoreId) addRecord(StoreId, Record)deleteRecord(StoreId, RecordId) getRecord(StoreId, RecordId)getNextRecordId(StoreId, RecordId) getRecordSize(StoreId, RecordId)setRecord(StoreId, RecordId, RecordValue) createDatabase(BaseName,SourceName) findRecord (DB, Key, Pos, Separator, Ordered)setOrderKey(DB, Pos, Separator) findFirstRecord(StoreId)findNextRecord(StoreId) findRepeatedRecord (DB, Key, Pos, Separator,Ordered) defragStore (StoreName) appendLastRecord (StoreId, string)addRecordFromVars (StoreId, varList) setVarsFromRecord (StoreId,RecordId) getVarFromRecord (StoreId, RecordId, VarName) setView(DB, Key,Pos, Separator) deleteView(DB) setFilterView((DB, Key, Pos, Separator)CONSOLE print(string) printLn(string) CRYPTO encrypt (Message,SessionKey) decrypt(Message, SessionKey) encrypt2DES (Message,SessionKey) decrypt2DES (Message, SessionKey) xor (string1, string2)encrypt2DESHexa (Message, SessionKey) decrypt2DESHexa (Message,SessionKey) encryptHexa (Message, SessionKey) decryptHexa(Message,SessionKey) PRINTER open( ) setWidthMode(mode) setHeightMode(mode)print(string) printLn(string) close( ) printLGO(LOGOFileName) CARDcheckRanges(currentPAN, privateLabelSuffix) checkRangesInStore(currentPAN, StoreName) SYSTEM currentTimeSecs ( ) datetime2Seconds(datetime) seconds2datetime (seconds) isValidDate (datetime) datetime () currentTicks ( ) ISO charToHex(String) hexToChar(String)readPackager(String) transactMessage(String host, Int port, Stringfieldlist, String channel, String header, String trailler, StringmandatoryFields) transactFromRecord(String host, Int port, Int storeId,Int recordId, String channel, String header, String trailer, StringmandatoryFields) transactFromRecordToVar(String host, Int port, IntstoreId, Int recordId, String channel, String header, String trailer,String mandatoryFields) hexToInt(String hexa, Boolean BigEndian)intToHex(Int i, Boolean BigEndian)Specific Libraries and Functions Created to the POS Client System:2.4.1—RECORDSTORE Extended Library

The aim of this library is to allow the persistence of information,storing the data in indexed files.

List of Functions:

openStore (Name. CreateIfNecessary)—This function receives as parametersthe name of the file to be created and a boolean variableCreateIfNecessary, pointing if the file should be created in case itdoesn't exists. At the same time of the file creation, also a respectiveindex file is created. Returns an integer with the index (id) of theopen file or invalid, in case fails to open or create the file.closeStore(StoreId)—This function receives as parameter the index(StoreId) of the opened file, dosing the data and index files. Returnsan integer with the index (StoreId) of the closed file. If it does notsucceed on closing the file or if StoreId does not exist, it returnsinvalid.deleteStore (Name)—This function receives as parameter a string, Name,containing the name of the opened file and deletes this data file, aswell as its index file. Returns an integer greater or equal to zero ifit succeeds deleting the files. If it does not succeed, it returnsinvalid.getNumRecords(StoreId)—This function receives as parameter an integer,StoreId, containing the index of the opened file and obtains the numberor records registered. Returns and integer greater or equal to zero ifit succeeds obtaining the number of records. Otherwise, it returnsinvalid.getSize(StoreId)—This function receives as parameter an integer,StoreId, containing the index of the opened file and gets its size inbytes. If the operation is successful it returns an integer with thefile size (total number of bytes), otherwise it returns invalid.addRecord(StoreId, Record)—This function receives as parameter aninteger, StoreId, containing the index of the opened file and onestring, Record, containing the data to be included in the file. If itsucceeds appending, it returns an integer with the index of the appendedrecord in the data file, otherwise, it returns invalid.deleteRecord(StoreId, RecordId)—This function receives two integers asparameters: StoreId, containing the index of the opened file andRecordId, containing the index of the record to be excluded of the file.If it succeeds deleting, it returns an integer with the index of thatdeleted record, otherwise, it returns invalid.getRecord(StoreId, RecordId)—This function receives two integers asparameters: StoreId, containing the index of the opened file andRecordId, containing the index of the record to be retrieved. If itsucceeds the reading operation, it returns an integer with the index ofthat retrieved record, otherwise, it returns invalid.getNextRecordId(StoreId, RecordId)—This function receives two integersas parameters: StoreId, containing the index of the opened file andRecordId, containing the index of the previous record to be retrieved.If it succeeds finding the index of the next record, it returns theindex as an integer, otherwise, it returns invalid.getRecordSize(StoreId, RecordId)—This function receives two integers asparameters: StoreId, containing the index of the opened file andRecordId, containing the index of the record to be sized. If it succeedsfinding the record index, it returns an integer with its size in bytes,otherwise, it returns invalid.setRecord(StoreId, RecordId, RecordValue)—This function receives asparameter the integers StoreId, containing the index of the opened fileand RecordId, containing the index of the record to be changed and thestring RecordValue, containing the new values to be recorded. Thisfunction is useful to update information in a given record, as long asit does not alter its size. In case of well-succeeded changing, theRecordId of that record will be returned, otherwise the return valuewill be invalid. If the size of the record is not the same, it returnsinvalid. In this case, it must be excluded and new information in a newrecord should be recorded.createDatabase(BaseName, SourceName)—This function creates a recordstore under the name Basename from a source file SourceName, bothprovided as parameters. The function returns a zero or a positiveinteger if it succeeds. It returns invalid if it can not create therecord store.findRecord (DB, Key, Pos, Separator, Ordered)—This function searches astring Key located in the position Pos related to the Separator. If thefile DB is organized in relation to the desired field, the parameterOrdered may be equal to true, allowing the realization of a binarysearch in DB.setOrderKey(DB, Pos, Separator)—This function defines the search orderin the DB file according to the position Pos in relation to theseparator, for the functions findFirsRecord( ) and findNextRecord( ).findFirstRecord(StoreId)—This function receives as parameter the handle(StoreId) of the opened file and returns its first record index.Function setOrderKey( ) must have been called previously. Returns aninteger index related to the position of the first record according tothe order defined by the function setOrderKey(DB, Pos, Separator), orinvalid in case of failure (it can't open the file, for example).findNextRecord(StoreId)—This function receives as parameter the handle(StoreId) of the opened file and returns the next record index. FunctionfindFirstRecord( ) must have been called previously. Returns an integerindex related to the position of the next record according to the orderdefined by the function setOrderKey(DB, Pos, Separator), or invalid incase of failure (it can't open the file, for example).findRepeatedRecord (DB, Key, Pos, Separator, Ordered)—This functionworks like findRecord( ), but it considers the occurrence of recordswith repeated keys. Returns the Id of the founded record.defragStore (StoreName)—This function physically removes deleted recordsfrom the RecordStore named StoreName. The record Store must not beopened when it is called. It returns invalid if it fails.appendLastRecord (StoreId, string)—This function appends the stringargument to the content of the last physical record, if it is notdeleted. It should to be called right after addRecord( ). It returns theRecordId.addRecordFromVars (StoreId, varList)—This function adds a record toopened RecordStore identified by StoreId with the variables defined inthe semi-colon separated var name list varlist. It returns the id of theadded record, which should be saved for future usage with the functionssetVarsFromRecord( ) or getVarFromRecord( ).setVarsFromRecord (StoreId, RecordId)—This function sets the WML contextwith the variables got from the record identified with RecordId of theopened RecordStore identified by StoreId. It returns the id of addedrecord read, which should have been saved with functionaddRecordFromVars( ).getVarFromRecord (StoreId. RecordId. VarName)—This function returns thevalue of the variable named VarName from the record identified withRecordId of the opened RecordStore identified by StoreId. If thevariable is not defined by the record it returns the empty string.setView(DB, Key, Pos, Separator)—This function defines a navigationfilter for a record store DB, having value key on the field at theposition Pos in relation to the separator. The record store is supposedto be ordered by the same field. Views created with this function offera fully transparent selection at the record store to the basicnavigation functions.deleteView(DB)—This function deletes the records selected by the viewcurrently set for a record store DB.setFilterView(DB, Key, Pos, Separator)—This function defines anavigation filter for a record store DB, having value key on the fieldat the position Pos in relation to the separator. The record store isnot supposed to be ordered by any field. Views created with thisfunction offer a fully transparent selection at the record store to thebasic navigation functions, although records out of the view will besequentially skipped when RecordStore.getNextRecordId( ) be called.2.4.2 CONSOLE Extended Library

This Library contains a set of functions used for application debugging.

List of Functions:

print(string)—This function shows the text of debugging string in theinformation window of the client system. No new line character isinserted after the text. Returns 1 if it succeeds on showing or,otherwise, invalid.

printLn(string)—This function shows the debugging text string on theinformation window of the client system. It inserts a new line characterafter the text. Returns 1 if it succeeds showing, otherwise, it returnsinvalid.

2.4.3 CRYPTO Extended Library

This Library contains a set of functions used for the ciphering anddeciphering of information to be transmitted with more security throughthe web.

List of Functions:

encrypt (Message, SessionKey)—This function returns the messageparameter encrypted with DES algorithm. If message size is greater than512 bytes or if the ciphering does not succeed, the message returnsinvalid. SessionKey is the 16 bytes string corresponding to an 8 bytekey hex-encoded. The return value is an ascii string hex-encoded withthe double length of the Message argument.decrypt(Message, SessionKey)—This function returns the message parameterdecrypted with DES algorithm. If Message size is greater than 1024 bytesor if the ciphering does not succeed, the message returns invalid.SessionKey is the 16 bytes string corresponding to an 8 byte keyhex-encoded. Message parameter is supposed to be an ascii hex-encodedstring with the double length of the returned value.encrypt2DES (Message, SessionKey)—This function returns the messageparameter encrypted with DES algorithm. Prior to encrypting, it prefixesthe Message with the BCD representation of its length. If Message sizeis greater than 512 bytes or if the ciphering does not succeed, themessage returns invalid. SessionKey is the 16 bytes string correspondingto an 8 byte key hex-encoded. The return value is an ascii stringhex-encoded with the double length of the Message argument.decrypt2DES (Message. SessionKey)—This function returns the messageparameter decrypted with DES algorithm. If Message size is greater than1024 bytes or if the ciphering does not succeed, the message returnsinvalid. Message parameter is supposed to be an ascii string hex-encodedwith the double length of the returned value plus the size of the lengthof the string.xor (string, string2)—This function receives two hex-encoded asciistrings and returns the hex-encoded ascii string corresponding to xorbetween their binary values.encrypt2DESHexa (Message, SessionKey)—This function returns the messageparameter encrypted with DES algorithm. Prior to encrypting, it prefixthe Message with the BCD representation of its length. Message argumentis supposed to be an hex-encoded ascii string. If Message length isgreater than 1024 bytes or if the ciphering does not succeed, themessage returns invalid. SessionKey is the 16 bytes string correspondingto an 8 byte key hex-encoded. The return value is an ascii stringhex-encoded with the same length of the Message argument.decrypt2DESHexa (Message. SessionKey)—This function returns the messageparameter decrypted with DES algorithm. If Message size is greater than1024 bytes or if the ciphering does not succeed, the message returnsinvalid. SessionKey is the 16 bytes string corresponding to an 8 bytekey hex-encoded. Message parameter is supposed to be an ascii stringhex-encoded with the same length of the returned value plus the size ofthe length of the string.encryptHexa (Message, SessionKey)—Same as encrypt, but message is inhexadecimal representation. The return value is an ascii stringhex-encoded with the double length of the Message argument.decryptHexa(Message, SessionKey)—Same as encrypt, but message is inhexadecimal representation. The return value is the message parameterdecrypted with DES algorithm.2.4.4—PRINTER Library

This library contains a set of functions used for printing.

List of Functions:

open( )—This function opens the output to the printer. If it succeeds,it returns the obtained handle, otherwise it returns invalid.

setWidthMode(mode)—This function configures the width to the font beingsent to the printer, taking as a base the mode parameter. Mode must beconversion to integer or floating-point compliant. If it succeeds itreturns true, if not or the parameter mode is illegal, it returnsinvalid.setHeightMode(mode)—This function configures the height of the fontbeing sent to the printer, taking as a base the parameter mode. Modemust be conversion to integer or floating-point compliant. If itsucceeds it returns true, if not or the parameter mode is illegal, itreturns invalid.print(string)—This function prints the content of string. Returns trueif the print succeeds, otherwise, it returns invalid.printLn(string)—This function prints the content of string and adds anew line character after the print. Returns true if the print succeeds,otherwise, it returns invalid.close( )—This function closes the output to the printer, returning anempty string (“ ”).printLogo(LOGOFileName)—This function receives as parameter the path tothe file where the bitmap, in LGO format, that will be printed islocated. The function returns either a negative value in case it failsor “1” in case it succeeds printing.2.4.4 CARD Library

This library contains a set of functions used for financial card BINrange check.

List of Functions:

checkRanges(currentPAN, privateLabelSuffix)—This function checks therange of the given card PAN against those read from the POS environmenton variables MAXIbIX and MINIbIX, where IbI stands for the givenprivateLabelSuffix and X stands for the counter of ranges for thatlabel. X begins at 0. If the currentPAN fits to range X then INFIbIX. Ifit does not fit to any range, it returns invalid. If no private labelsuffix is give, it assumes default value “PAN”.checkRangesInStore (currentPAN. StoreName)—This function checks therange of the given card PAN against those read from the records of theStoreName RecordStore. Each record is supposed to have a semi-colonseparated three-element string, e.g “4400;4999;returnedinfo”. The PAN ischecked against the two first elements of each record until it fitsin-between them. The function returns the third element of the firstrecord that fits. If it does not fit to the range of any record, itreturns invalid.2.4.5 SYSTEM Library

This library contains a set of functions used for accessing system timeutilities.

List of Functions:

currentTimeSecs ( )—This function returns the current POS time inseconds from 01/01/1970, 00:00:00.

datetime2 Seconds (datetime)—This function returns the number of secondspassed from Jan. 1, 1970, 00:00:00 to the date and time expressed bydatetime with format “YYYYMMDDHHMMSS”.

seconds2datetime (seconds)—This function returns the date and timecorresponding to number of seconds passed from Jan. 1, 1970, 00:00:00expressed by seconds. Return value is with format “YYYYMMDDHHMMSS”.

isValidDate (datetime)—This function returns true if the datetimeargument is expresses a valid date/time with format “YYYYMMDDHHMMSS”.

datetime ( )—This function returns the current POS date and time. Returnvalue format is “YYYYMMDDHHMMSS”.

currentTicks ( )—This function returns the number of milliseconds sincethe POS was started.

2.4.6 ISO Library

This library contains a set of functions to deal with ISO-8583 messages.

charToHex(String)—This function receives a String as Input and returnsanother String with the HEXADECIMAL representation of the input Stringin ASCII.

hexToChar(String)—This function receives a String as Input that is aHEXADECIMAL representation of a String (in ASCII) and returns the Stringrepresented. The returning String will always have the half size of thesource String. If the source String length is odd, the function willreturn invalid.readPackager(String)—This function updates the packager used to pack theISO-8583 message. The input String is the PATH of the file with thepackager definition.

The returning value is the error code. If return is zero, no erroroccurred.

The format of the file that defines the packager is:FIELDID=PACKAGER;LEN<;INNERPACKAGER FILEPATH>

Example

#this is a comment 0=IFB_NUMERIC;4 1=IFB_BITMAP;16 2=IFB_LLNUM;193=IFB_NUMERIC;6 #4=IFB_NUMERIC;12 34=IFB_LLLIBINARY;999;f:subdef.pdf

To reduce the size of the file and decrease the parsing time, spacecharacters are not allowed in a packager definition file. This file is aregular text file (text format).

The ISO fields have a packager, that identifies the format the data willbe sent in the ISO message. A field can, optionally, have inner fields.A inner packager can be defined to let the client system parse thefield. To this happens, a file path containing the inner packagerdefinition can be specified.

The possible packagers are: IFB_BITMAP, IF_HEX, IFA_LLHEX, IFA_LLLHEX,IFB_LLHEX, IFB_LLLHEX, IF_BINARY, IFA_LLBINARY, IFA_LLLBINARY,IFB_LLBINARY, IFB_LLLBINARY, IF_CHAR, IFA_LCHAR, IFA_LLCHAR,IFA_LLLCHAR, IFB_LLCHAR, IFB_LLLCHAR, IFA_NUMERIC, IFA_LLNUM,IFA_LLLNUM, IFB_NUMERIC, IFB_LLNUM, IFB_LLLNUM, IFA_AMOUNT, IFB_AMOUNT,IFB_LLLIHEX, IFB_LLLIBINARY, IFB_LLLICHAR and IFB_LLLINUM.

There are 6 types of packager: Numeric, Amount, Character, Hexa, Binaryand Bitmap.

The L, LL or LLL characters indicates the maximum size of a field. If afield is IFA_LLLNUM, means that its size cannot be greater than 999.

The IFA or IFB prefix indicates that the numeric portion of a field isstored in ASCII or BCD.

The ‘I’ in some packager names (ex: IFB_LLLINUM) indicates that thefield will be identified. This is useful for defining inner packagers,where the inner fields should be identified.

Numeric: This packager receives a String with a numeric representation(ex:“12345”).

Results:

IFA_NUMERIC: 12345 (number sent as a String) IFA_LLNUM: 0512345 (thefield size in ASCII) IFA_LLLNUM: 00512345 (the field size in ASCII)IFB_NUMERIC: x12 x34 x50 (number stored in BCD) IFB_LLNUM: x05 x12 x34x50 (field size also in BCD) IFB_LLLNUM: x00 x05 x12 x34 x50 (field sizealso in BCD) IFB_LLLINUM: x00 x05 x23 x12 x34 x50 (id is 23. Also inBCD)Amount:

This packager is similar to the numeric, except the fact that ispre-ceded by a character that indicates the signal. The input for thispackager may be a String like “D12050”.

Results:

IFA_AMOUNT: C12345 (number sent as a String) IFB_AMOUNT: x43 x12 x34 x50(number sent in BCD)Character:

This packager receives a String like “this text is ok! 12345”.

Results:

IFA_CHAR: 12345 (field sent as a String) IFA_LCHAR: 512345 (the fieldsize in ASCII) IFA_LLCHAR: 0512345 (the field size in ASCII)IFA_LLLCHAR: 00512345 (the field size in ASCII) IFB_CHAR: x31 x32 x33x34 x35 (field sent as a String) IFB_LLCHAR: x05 x31 x32 x33 x34 x35(field size in BCD) IFB_LLLCHAR: x00 x05 x31 x32 x33 (field size also inBCD) x34 x35 IFB_LLLICHAR: x00 x05 x23 x31 x32 x33 (id is 23. Also inBCD) x34 x35

Hexa:

This packager receives a String representing (in hexadecimal) a binaryfield. The hexa String is converted into a binary field and appended inthe message.

Results:

IF_HEX: x31 x32 x33 x34 x35 (field sent in binary) IFA_LLHEX: x30 x35x31 x32 x33 x34 x35 (size (05) in ASCII) IFA_LLLHEX: x30 x30 x35 x31 x32x33 x34 x35 (size (005) in ASCII) IFB_LLHEX: x05 x31 x32 x33 x34 x35(size (05) in BCD) IFB_LLLHEX: x00 x05 x31 x32 x33 x34 x35 (size (005)in BCD)

Binary:

This packager receives a binary buffer and creates a binary field in themessage. As there is not a binary type for WMLScript, this packager wasintentionally created to wrap inner fields. The inner fields may benumeric+char and the outer field should be defined as binary. As packingthe inner fields, the binary buffer result (outer field) will be packedautomatically as binary by the engine.

Results:

IF_BINARY: x31 x32 x33 x34 x35 (field sent in binary) IFA_LLBIN: x30 x35x31 x32 x33 x34 x35 (size (05) in ASCII) IFA_LLLBIN: x30 x30 x35 x31 x32x33 x34 x35 (size (005) in ASCII) IFB_LLBIN: x05 x31 x32 x33 x34 x35(size (05) in BCD) IFB_LLLBIN: x00 x05 x31 x32 x33 x34 x35 (size (005)in BCD)

Bitmap:

This is a special packager that stores a binary bitmap in the message.This bitmap is created based on the existence of the message fields.This packager is used for field 1.

transactMessage(String host, Int port, String fieldlist, String channel,String header, String trailler, String mandatoryFields)—This functionsends and receives a message based on the packager configured and thefieldlist used. The field list is a String that wrap the field namesthat will be sent in the message. The tokens are separated by a ‘;’character. Fields are named by the rule f<field ID>. If the name sent isan sub field name, the rule is f<field iD>s<sub ID>.

Example of a Field List:

“f0;f2;f3;f28;f11;f34s0;f34s2s0;f34s2s2;f34s3;f34s5;f41;f70”

f34 is composed by f34s0, f34s2, f34s3 and f34s5, while f34s2 iscomposed by f34s2s0 and f34s2s2. Here we found three levels of innerfields.

The header and trailer to be sent in the message are hexadecimal stringsrepresenting the binary header and trailer that will be sent.

Example

“0600030001” generates x06 x00 x03 x00 x01

The selected channel reflects the way the message length is stored inthe message. The available channels are: “ASCII”, “RAW”, “NAC” and“NCC”.

Example (Message Size is 256)

ASCII: x30×32×35×36 (“0256”)

RAW: x00 x00 x01 x00 (0000-0000 0000-0000 0000-0001 0000-0000)

NAC: x01 x00 (0000-0001 0000-0000)

NCC: x02×56 (BCD)

The values for the fields sent in the fieldlist parameter, has to storevalues as variables in memory. You may set them with“WMLBrowser.setvar(fieldname, value);”.

The message will be sent to the server and the script will block waitingfor the response. If errors occur it will be retrieved as the functionreturning value, otherwise zero will be returned.

The response message is parsed by the packager rules. The fields and subfields found will be saved into variables in memory too. The conventionnaming for that response variables are the same for the sending, butinstead of a ‘f’ preceding the ID a ‘r’, will be the suffix.

The mandatoryFields argument is a String formatted as fieldlist is. Itforces the response to be checked. If a mandatory field is missing anerror occurs and the transaction is not processed.

From the moment the function returns and so on, the application has torecover the variables, verify them and do what is desired to do. May beprint a receipt.

transactFromRecord(String host, Int port, Int storeId, Int recordId,String channel, String header, String trailer, StringmandatoryFields)—This function sends and receives a message based on thepackager configured and the ISO fields set. The fields are stored in aRecord of a RecordStore. The RecordStore identification is passed as thestoreId parameter and the Record identification is passed as recordedparameter. In order to build a record with the ISO fields, you shoulduse the addRecordFromVars( ) function of the RecordStore library.

This function offers an alternative way to set arguments (in this case,the ISO fields) for a ISO transaction.

The header and trailer to be sent in the message are hexadecimal stringsrepresenting the binary header and trailer that will be sent.

Example

“0600030001” generates x06 x00 x03 x00 x01

The selected channel reflects the way the message length is stored inthe message. The available channels are: “ASCII”, “RAW”, “NAC” and“NCC”.

Example (Message Size is 256)

ASCII: x30×32×35×36 (“0256”)

RAW: x00 x00 x01 x00 (0000-0000 0000-0000 0000-0001 0000-0000)

NAC: x01 x00 (0000-0001 0000-0000)

NCC: x02×56 (BCD)

The mandatoryFields argument is a list of fields to be checked ifpresent in the response.

Example of a mandatoryFields List:

“f0;f2;f3;f28;f11;f34s0;f34s2s0;f34s2s2;f34s3;f34s5;f41;f70”

f34 is composed by f34s0, f34s2, f34s3 and f34s5, while f34s2 iscomposed by f34s2s0 and f34s2s2. Here we found three levels of innerfields.

MandatoryFields forces the response to be checked. If a mandatory fieldis missing, an error occurs and the transaction is not processed.

The response message fields are stored in a new Record of theRecordStore and its id is the function returning value. To restore thefields in variables you should call the SetVarsFromRecord( ) function ofthe RecordStore library. The variables are set using the samenomenclature rule as transactMessage( ) does.

transactFromRecordToVar(String host, Int port, Int storeId, IntrecordId, String channel, String header, String trailer, StringmandatoryFields)—This function sends and receives a message based on thepackager configured and the ISO fields set. The fields are stored in aRecord of a RecordStore but the return is set to the WML Variable namedISORESP. If result length exceeds the WML maximum variables length(512), exceeding bytes are split into 500 bytes variables namedISORESPn, n=1 . . . WML Variable ISONRESP is also set with the totalnumber of variables needed to store the result, including ISORESP. TheRecordStore identification is passed as the storeId parameter and theRecord identification is passed as recorded parameter. In order to builda record with the ISO fields, you should use the addRecordFromVars( )function of the RecordStore library.

This function offers an alternative way to set arguments (in this case,the ISO fields) for an ISO transaction.

The header and trailer to be sent in the message are hexadecimal stringsrepresenting the binary header and trailer that will be sent.

Example

“0600030001” generates x06 x00 x03 x00 x01

The selected channel reflects the way the message length is stored inthe message. The available channels are: “ASCII”, “RAW”, “NAC” and“NCC”.

Example (Message Size is 256)

ASCII: x30×32×35×36 (“0256”)

RAW: x00 x00 x01 x00 (0000-0000 0000-0000 0000-0001 0000-0000)

NAC: x01 x00 (0000-0001 0000-0000)

NCC: x02×56 (BCD)

The mandatoryFields argument is a list of fields to be checked ifpresent in the response.

Example of a mandatoryFields List:

“f0;f2;f3;f28;f11;f34s0;f34s2s0;f34s2s2;f34s3;f34s5;f41;f70”

f34 is composed by f34s0, f34s2, f34s3 and f34s5, while f34s2 iscomposed by f34s2s0 and f34s2s2. Here we found three levels of innerfields.

MandatoryFields forces the response to be checked. If a mandatory fieldis missing, an error occurs and the transaction is not processed.

The response message fields are stored in a new Record of theRecordStore and its id is the function returning value. To restore thefields in variables you should call the SetVarsFromRecord( ) function ofthe RecordStore library. The variables are set using the samenomenclature rule as transactMessage( ) does.

hexToInt(String hexa, Boolean BigEndian)—This function receives anhexadecimal representation of as Integer. The Integer in the scriptengine is four bytes long, so the hexa parameter can be a string of 2,4, 6 or 8 character long, representing the Integer bytes. Thisrepresentation can be as a “Big Endian” or “Little Endian”, and this isinformed in the in the Boolean parameter BigEndian (if working with abig endian representation, set it to true). The returning value is thedesired Integer.

intToHex(Int i, Boolean BigEndian)—This function converts an integerinto an hexadecimal representation of a Integer.

Additionally, the client system contains a library called PinPad thatcontains a set of functions used for accessing the PIN Pad device andthe POS EMV Kernel through the EMV standard interface.

This invention is to be applied in a variety of business areas, such ashealthcare services/insurance, loyalty, remote banking, bill payment,pre-paid reload financial, gift card, money transfer, and ageverification, time and labor management, among others.

The application herein described is an embodiment of the possibilitiesprovided by the invention. Many different application modes can bedesigned, using different connection means even devices and network. Thetrue scope of the invention is defined by the claims.

The invention claimed is:
 1. A system for supporting Web applications ona point-of-sale (POS) terminal, the system comprising: a clientapparatus configured to connect the POS terminal to a network using aplurality of communication protocols and transaction protocols,transaction protocols including at least HTTP, ISO8583 and XMLoperations; the client apparatus including at least one customized WMLand Script extension added to preexisting WAP standards to form anapplication development and runtime environment for developingapplications for download and use on the POS terminal, the clientapparatus comprising a processor and a memory having computer codestored therein, the computer code configured, when executed by theprocessor, to cause the client apparatus to: download, run, and updateapplications from application servers connected to the network usingHTTP on top of TCP/IP; enable one or more applications to use multiplecommunication protocols when connected to distinct access networks;extend a web based runtime environment to perform electronic ISO8583operations using POS peripheral devices, the web based runtimeenvironment configured to support persistence of information and toprevent multi-application interference by supporting multi-applicationsindependently carried out in logical distinct environments; andrecognize, access, and control a plurality of POS peripheral devices,the POS peripheral devices comprising input and output peripheraldevices, wherein the system further comprises: transaction serversconfigured to be accessed by the client system for executing electronicoperations using different transaction protocols.
 2. The system forsupporting Web applications on the POS terminal according to claim 1,wherein said different transaction protocols comprise HTTP, ISO 8583 andXML.
 3. The system for supporting Web applications on the POS terminalaccording to claim 1, wherein the communication protocols are selectedfrom a group consisting of TCP/IP, PPP, SDLC, X.28, GPRS, CDMA, CDMA 1X,Ethernet, GSM, Wi-Fi, Bluetooth and IR.
 4. The system for supporting Webapplications on the POS terminal according to claim 1, wherein theperipheral devices are selected from a group consisting of magnetic cardreaders, smart card readers, printers, pin pads, bar code readers, checkreaders, keyboards, Mifare contact-less card reader and sensitive touchscreen.
 5. The system for supporting Web applications on the POSterminal according to claim 1, wherein the customized WML and Scriptextension added to preexisting WAP standards further comprises means forexecuting electronic operation with chip cards.
 6. The system forsupporting Web applications on the POS terminal according to claim 1,wherein the communication protocols are synchronous data link control(SDLC) or X.28.
 7. The system for supporting Web applications on the POSterminal according to claim 1, wherein the system further comprises anapplication server; and wherein the application server is configured to:process a request from the client system, contact at least one of thetransaction servers to retrieve configuration settings describing theclient system, utilize the configuration settings to build a customizedversion of an application for the client system, and send the customizedversion of the application for the client system to the client systemfor execution by the client system.
 8. The system for supporting Webapplications on the POS terminal according to claim 1, wherein thesystem further comprises an application server; and wherein theapplication server is configured to: process a request from the clientsystem, contact at least one of the transaction servers by sending aISO8583 message via a TCP/IP connection between the application serverand the at least one transaction server to retrieve configurationsettings describing the client system, utilize the configurationsettings to build a customized version of an application for the clientsystem, and send the customized version of the application for theclient system to the client system for execution by the client system.